package com.woniuxy.stage3demo.configuration;

import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class SpringMvcConfiguration implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {

        //登录页面
        registry.addViewController("/").setViewName("index");
        //导航栏
        registry.addViewController("/main").setViewName("main");
        //系统首页
        registry.addViewController("/syspage").setViewName("syspage/syspage");


        registry.addViewController("/table").setViewName("aftermag/overdue");
        registry.addViewController("/tables").setViewName("aftermag/repaymentReminder");
        registry.addViewController("/tablese").setViewName("aftermag/prepayment");
        registry.addViewController("/tableses").setViewName("aftermag/reduction");

        //何鹏达
        //渠道管理
        registry.addViewController("/channelmag").setViewName("channel/channel_list");
        //产品列表
        registry.addViewController("/productmag").setViewName("sysmag/product_list");
        //产品日志
        registry.addViewController("/productLogmag").setViewName("sysmag/productLog_list");
        //产品审核
        registry.addViewController("/productCheck").setViewName("sysmag/productCheck_list");


        registry.addViewController("/userlist").setViewName("usermag/userlist");

        //贺培烜
        //跳转至：风控审核-审核任务处理
        registry.addViewController("/order").setViewName("check/order_info");
        //跳转至：合同管理-合同签署查询
        registry.addViewController("/contract").setViewName("/contract/contract");

        //刘康
        //风控管理/反欺诈引擎
        registry.addViewController("/fraud").setViewName("riskcontrol/fraud");
        //运营管理/优惠券管理
        registry.addViewController("/cous").setViewName("operatemag/cous");
        //系统管理/客服管理
        registry.addViewController("/customer").setViewName("sysmag/customer");

        //彭子宸
        //运营管理-帮助信息
        registry.addViewController("/qainfor").setViewName("operatemag/qainfor");
        //运营管理-广告管理
        registry.addViewController("/ads").setViewName("operatemag/ads");
        //风控管理-申请资料配置
        registry.addViewController("/applydataconfig").setViewName("riskcontrol/applydataconfig");
        //风控管理-电核项配置
        registry.addViewController("/phonecheck").setViewName("riskcontrol/phonecheck");

        //陈宇轩
        //部门页面
        registry.addViewController("/dept").setViewName("sysmag/dept");
        //员工页面
        registry.addViewController("/staff").setViewName("sysmag/staff");
        //日志页面
        registry.addViewController("/optLog").setViewName("sysmag/optLog");
        //风险管理-准入规则页面
        registry.addViewController("/entranceRule").setViewName("riskcontrol/entranceRule");

        //刘英澜
        //系统消息
        registry.addViewController("/sysmessage").setViewName("message/sysMessage");
        //站内信消息
        registry.addViewController("/stationmessage").setViewName("message/stationMessage");
        //邮件消息
        registry.addViewController("/emailmessage").setViewName("message/emailMessage");


        registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
    }
}
